package com.example.javabeantest.javaBeanSamples;
import  java.io.UnsupportedEncodingException;
public class CharactEncoding {
    public  CharactEncoding(){
    }
    public String toString(String str){
        String text="";
        if (str !=null&& ! "".equals(str)){
            try {
                text=new String(str.getBytes("iso8859-1"),"UTF-8");
            }catch (UnsupportedEncodingException e){
                e.printStackTrace();
            }
        }
        return  text;
    }
}
